﻿using System.Collections;
using System.Collections.Generic;
using DG.Tweening;
using UnityEngine;
public class baseCub : MonoBehaviour {
    protected bool _hasInit = false;
    protected string recycleType; //回收类型
    protected Vector3 initScale;
    //初始化
    public void _init (Vector3 pos, string recycleType,Transform parent = null) {
        if (!_hasInit) {
            _hasInit = true;
			if (parent!= null) {
                transform.SetParent(parent, false);
            } else {
                transform.SetParent(Global.GameProxy.ControlBox.bgContent, false);
            }
            this.recycleType = recycleType;
            initScale = transform.localScale;
        }
        transform.localPosition = pos;
    }
    public virtual void recycling () {
        Global.GameProxy.ControlBox.pushPrefabByName (recycleType, gameObject);
    }
}